﻿/// <reference path="Input.js" />
/// <reference path="ComboBox/ComboBox.js" />

//控件管理器
var ControlManager = {
    create: function (ctype, config) {
        /// <summary>根据xtype类型创建控件对象</summary>
        /// <param name="ctype" type="String">控件的唯一标识串</param>
        /// <param name="config" type="JSONObject">配置数据</param>
        if (ctype === "input") {
            return new Input(config);
        }
        if (ctype === "combobox") {
            return new ComboBox(config);
        }
        if (ctype === "label") {
            return new Label(config);
        }
        if (ctype === "button") {
            return new Button(config);
        }
        if (ctype === "fieldset") {
            return new Fieldset(config);
        }
    }
};